#include <iostream>
using namespace std;

int main()
{
    cout << "Enter the amount of water in kilograms: ";
    float mass;
    cin >> mass;

    cout << "Enter the initial temperature: ";
    float initialTemp;
    cin >> initialTemp;

    cout << "Enter the final temperature: ";
    float finalTemp;
    cin >> finalTemp;

    float energy = mass * (finalTemp - initialTemp) * 4184;

    cout << "The energy needed is " << energy << endl;

    return 0;
}
